package com.jinghua.treatment.schedule;

import com.jinghua.treatment.wechat.util.WechatUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class BizSchedule {

    private final Logger LOG = LoggerFactory.getLogger(this.getClass());

    /**
     * 每隔1小时58分去微信的access_token
     */
    @Scheduled(cron = "1 58 0/1 * * ?")
    public void qywechatAccessToken() {
        WechatUtil.getAccessToken();
        LOG.debug("重新去获取微信的 access_token");
    }
}
